package p270jp.pxv.android.advertisement.presentation.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.ImageView;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import p064c6.Preconditions;
import p072ce.ViewYufulightOverlayAdBinding;
import p189gn.AbstractC3435a;
import p216hn.Lambda;
import p216hn.Reflection;
import p259je.YufulightAdvertisementViewTarget;
import p270jp.pxv.android.R;
import p325m0.MutabilityOwnership;
import p376no.Koin;
import p404oo.AbstractC5475a;
import p572vg.YufulightAdvertisement;
import p579vo.Qualifier;
import p603wm.AbstractC6949c;
import p677zi.PixivImageLoader;

/* compiled from: YufulightOverlayAdView.kt */
/* renamed from: jp.pxv.android.advertisement.presentation.view.YufulightOverlayAdView */
/* loaded from: classes2.dex */
public final class YufulightOverlayAdView extends FrameLayout implements AbstractC5475a {

    /* renamed from: a */
    public final ViewYufulightOverlayAdBinding f18872a;

    /* renamed from: b */
    public final AbstractC6949c f18873b = Preconditions.m9802P(1, new C4186a(this, null, null));

    /* compiled from: KoinComponent.kt */
    /* renamed from: jp.pxv.android.advertisement.presentation.view.YufulightOverlayAdView$a */
    /* loaded from: classes2.dex */
    public static final class C4186a extends Lambda implements AbstractC3435a<PixivImageLoader> {

        /* renamed from: a */
        public final /* synthetic */ AbstractC5475a f18874a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4186a(AbstractC5475a aVar, Qualifier aVar2, AbstractC3435a aVar3) {
            super(0);
            this.f18874a = aVar;
        }

        /* JADX WARN: Type inference failed for: r0v4, types: [java.lang.Object, zi.a] */
        @Override // p189gn.AbstractC3435a
        public final PixivImageLoader invoke() {
            return this.f18874a.getKoin().f24118a.m920a().m621a(Reflection.m5499a(PixivImageLoader.class), null, null);
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public YufulightOverlayAdView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        MutabilityOwnership.m3745m(context, "context");
        MutabilityOwnership.m3745m(attributeSet, "attributeSet");
        ViewDataBinding c = DataBindingUtil.m11370c(LayoutInflater.from(getContext()), R.layout.view_yufulight_overlay_ad, this, true);
        MutabilityOwnership.m3746l(c, "inflate(LayoutInflater.f…t_overlay_ad, this, true)");
        this.f18872a = (ViewYufulightOverlayAdBinding) c;
    }

    private final PixivImageLoader getPixivImageLoader() {
        return (PixivImageLoader) this.f18873b.getValue();
    }

    @Override // p404oo.AbstractC5475a
    public Koin getKoin() {
        return AbstractC5475a.C5476a.m3211a(this);
    }

    public final void setupAdvertisement(YufulightAdvertisement.C6845e eVar) {
        MutabilityOwnership.m3745m(eVar, "yflData");
        PixivImageLoader pixivImageLoader = getPixivImageLoader();
        Context context = getContext();
        MutabilityOwnership.m3746l(context, "this.context");
        String str = eVar.f29133a;
        ImageView imageView = this.f18872a.f5439q;
        MutabilityOwnership.m3746l(imageView, "binding.imageView");
        ImageView imageView2 = this.f18872a.f5439q;
        MutabilityOwnership.m3746l(imageView2, "binding.imageView");
        pixivImageLoader.m58h(context, str, imageView, new YufulightAdvertisementViewTarget(imageView2, eVar));
    }
}
